# Create your views here.
# -*- coding: utf_8 -*-

from main import models
from django.http import HttpResponse
from django.shortcuts import render,render_to_response

def test(request):
	return HttpResponse('Hello world!')

def ServiceScript(request):
	s_content = models.Knowledge.objects.filter(subject = '0')
	return render(request,'Knowledge.html',{'scripts':s_content})

def ServicePolicy(request):
	s_policy =  models.Knowledge.objects.filter(subject = '1')
	return render(request,'Knowledge.html',{'policies':s_policy})

def ServiceFee(request):
	s_fee = models.Knowledge.objects.filter(subject = '2')
	return render(request,'Knowledge.html',{'fee':s_fee})

def ServiceFix(request):
	s_fix = models.Knowledge.objects.filter(subject = '3')
	return render(request,'Knowledge.html',{'fix':s_fix})

def ServicePromotion(request):
	s_promotion = models.Knowledge.objects.filter(subject = '4')
	return render(request,'Knowledge.html',{'promotions':s_promotion})

def gasprice(request):
	gp = models.GasBottle.objects.all()
	return render(request,'GasPrice.html',{'prices':gp})

def DeptInfo(request):
	pass	


